﻿<%@ Page Title="IC.NET Router Rules Manager" Language="C#" MasterPageFile="~/Rules.Master" AutoEventWireup="true" CodeFile="ValueLists.aspx.cs" Inherits="ICNETREST.ValueLists" %>


<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
  <script src="Scripts/ValueListManager.js" type="text/javascript"></script>

  <script type="text/javascript">
      $(function () {
          ValueListManager.initialize();

      });

  </script>

</asp:Content>
<asp:Content ID="PageTitle" ContentPlaceHolderID="PageTitleContent" runat="server">Value List Manager</asp:Content>
<asp:Content ID="ContentTitle" ContentPlaceHolderID="TitleContent" runat="server">Value List Manager</asp:Content>
<asp:Content ID="TitleContentDescription" ContentPlaceHolderID="TitleContentDescriptionContent" runat="server">
    <p><small>A webapp to help you manage value lists</small></p>
    <p>A value list is...  </p>
    <p>All current values for each of the value lists are listed in the table below.  In addition, you can perform the following operations on each of the value lists</p>
        <ul>
            <li>To <strong>add</strong> a new value list, click on the <em>Add New Value List</em> tab.  Fill in the form, and click on the <em>Add Value List</em> button. </li>
            <li>To <strong>modify</strong> an existing value list, click on the row corresponding to the value list you want to modify.  A form will pop up.  
                Fill in the form to modify the value list, and click on the <em>Modify Value List</em> button.</li>
            <li>To <strong>delete</strong> an existing value list, click on the row corresponding to the value list you want to delete.  A form will pop up.
                Make sure that the values in the form correspond to the value list you want to delete---<em class="text-error">this action cannot be undone!</em>.  Click on the
                <em>Delete Value List</em> button.
            </li>
        </ul>
    <h2>Web Services</h2>
    <p>Web services are provided to facilitate machine-to-machine system integration.  The following web services are available:</p>
        <dl class="dl-horizontal">
            <dt><a href="/ValueListService.svc/ContentKeywords">ContentKeywords</a></dt>
                <dd>returns all active content keywords in XML format</dd>
            <dt><a href="/ValueListService.svc/Roles">Listing of Roles</a></dt>
                <dd>returns a listing of all active roles in XML format</dd>
            <dt>Role-specific lists</dt>
                <dd>returns all active values lists of specific roles.  For example, this link returns all value lists for the ICS role:  <a href="/ValueListService.svc/Roles/ICS">/ValueListService.svc/Roles/ICS</a></dd>
        </dl>
    
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

    <div id="tabs">

	    <ul>
		    <li><a href="#tabs-1">Existing Value Lists</a></li>
		    <li><a href="#tabs-2">Add New Value List</a></li>
	    </ul>

	    <div id="tabs-1">
		    <h1>Current Value Lists:</h1>
        <div id="table">
          <table class="striped" id="vltable"></table>
        </div>
	    </div>

	    <div id="tabs-2">
        <h2>Create New Value List</h2>
        <div id="error" class="ui-state-error"></div>
		    <form action="#" class="ui-corner-all" id="vlform">
          
          <label for="adduri">Value List URI</label>
          <select id="adduri">
            <option value= "Default">Select a URI</option>
            <option value= "Other">Custom URI</option>
          </select>

          <br />
          
          <div id="uritext">
            <label for="texturi">Custom URI</label>
            <input type="text" size="40" id="texturi" />
          </div>  

          <label for="textvalue">Value</label>
          <input type="text" size="40" id="textvalue" />
          
          <label>Command Structure (optional)</label>
          <input type="text" size="40" id="cstruc" /><br />

          <label>Description (optional)</label>
          <input type="text" size="40" id="desc" /><br />

          <button type="button" id="addButton">Add ValueList</button>
        </form>
	    </div>
    </div>

    <div id="dialog" title="Modify Value List">
        <h2>Modify Value List</h2>
        <div id="modify" class="ui-state-error"></div>
		    <form action="#" class="ui-corner-all" id="modifiedvlform">
        
          <label>Value List URI</label>
          <input type="text" size= "40" id="moduri"/>
          
          <label>Value</label>
          <input type="text" size= "40" id="modvalue"/>
          
          <label>Command Structure (optional)</label>
          <input type="text" size="40" id="modcstruc" />

          <label>Description (optional)</label>
          <input type="text" size="40" id="moddesc" />
          
          <br /><br />

          <button type="button" id="modifyValueButton">Modify Value List</button> <br />
          <button type="button" id="deleteValueButton">Delete Value List</button>
        </form>
    </div>

</asp:Content>